<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
</head>

<body>
  <script type="text/javascript">
    function arr(qw) {
      let arr = []
      qw.forEach((val, index) => { //遍历list内的数据
        const num = parseInt(index / 8) //num相当于页码的索引值第0页，第一页...
        if (!arr[num]) {
          arr[num] = [] //判断arr[num]是否存在
        }
        arr[num].push(val) //若存在将val（数据的内容）添加到arr内
      })
      return arr
    }

    console.log(arr([1, 2, 3, 45, 6, 7, 8, 9, 0]));
  </script>
</body>

</html>